package com.wjc.hibernate.bean;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

@Entity
@Table(name = "user")
public class User implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -8444312437361831717L;
	@Id
	@Column(name = "user_id")
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "TableGenerator")
	@TableGenerator(table = "pk_table", pkColumnName = "pk_name", pkColumnValue = "pk_user_id", valueColumnName = "pk_value", name = "TableGenerator", allocationSize = 1)
	private Integer userId;
	@Column(name = "user_name")
	private String userName;
	@Column(name = "user_password")
	private String password;
	@Column(name = "user_nike_name")
	private String nikeName;
	@Column(name = "user_email")
	private String email;
	@Column(name = "active_status")
	@Enumerated(EnumType.STRING)
	private ActiveStaus activeStatus;
	@Column(name = "validation_code")
	private String validationCode;
	@Column(name = "registry_time")
	private Date registryTime;

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getNikeName() {
		return nikeName;
	}

	public void setNikeName(String nikeName) {
		this.nikeName = nikeName;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public ActiveStaus getActiveStatus() {
		return activeStatus;
	}

	public void setActiveStatus(ActiveStaus activeStatus) {
		this.activeStatus = activeStatus;
	}

	public String getValidationCode() {
		return validationCode;
	}

	public void setValidationCode(String validationCode) {
		this.validationCode = validationCode;
	}

	public Date getRegistryTime() {
		return registryTime;
	}

	public void setRegistryTime(Date registryTime) {
		this.registryTime = registryTime;
	}

}
